﻿using System;
using Utils;

namespace MomentumPlugin.Common
{
	[Serializable]
	internal class StrategyControlData : Plugins.Base.Common.StrategyControlDataBase, ICloneable<StrategyControlData>
	{
		#region Attributes

		private decimal _minVariation;
		private int _maxSeconds;
		private int _volume;
		private ExitMode _exitMode;
		private decimal _minWin;
		private decimal _maxLoss;

		#endregion

		#region Properties

		public decimal MinVariation
		{
			get
			{
				return _minVariation;
			}
			set
			{
				if (_minVariation != value)
				{
					_minVariation = value;
					base.OnPropertyChanged("MinVariation");
				}
			}
		}

		public int MaxSeconds
		{
			get
			{
				return _maxSeconds;
			}
			set
			{
				if (_maxSeconds != value)
				{
					_maxSeconds = value;
					base.OnPropertyChanged("MaxSeconds");
				}
			}
		}

		public int Volume
		{
			get
			{
				return _volume;
			}
			set
			{
				if (_volume != value)
				{
					_volume = value;
					base.OnPropertyChanged("Volume");
				}
			}
		}

		public ExitMode ExitMode
		{
			get
			{
				return _exitMode;
			}
			set
			{
				if (_exitMode != value)
				{
					_exitMode = value;
					base.OnPropertyChanged("ExitMode");
				}
			}
			
		}

		public decimal MinWin
		{
			get
			{
				return _minWin;
			}
			set
			{
				if (_minWin != value)
				{
					_minWin = value;
					base.OnPropertyChanged("MinWin");
				}
			}
		}

		public decimal MaxLoss
		{
			get
			{
				return _maxLoss;
			}
			set
			{
				if (_maxLoss != value)
				{
					_maxLoss = value;
					base.OnPropertyChanged("MaxLoss");
				}
			}
		}

		#endregion

		#region ICopiable

		public StrategyControlData Clone()
		{
			return (StrategyControlData)this.MemberwiseClone();
		}

		public void Copy(StrategyControlData source)
		{
			base.Copy(source);
		}

		#endregion
	}
}
